#define _Nx 100
template<class Model>
class smc2model : public Density::GeomBridge
{
		friend class Density::GeomBridge;
	public:
		smc2model(double *Y, mat X, Distribution::Distribution *Si,int T) : Density::GeomBridge(Y, X, Si){ 
			d= new boost::math::normal_distribution<>(0,1); 
			S=new Model(Y,X,T);	
  }
		~smc2model()
		{
			delete d;
		}
		inline double Likelihood(mat theta1)
		{
			
			SSlik::Likelihood<Model> Lik(S,(int)theta1.n_cols);
			return Lik(theta1.t(),_Nx);	
		}
		double Prior(mat theta){
			return 1;		
		}
		mat GradLik(mat theta)
		{
			cout << "no gradient for stovol";			
			return theta;

		}
		boost::math::normal_distribution<>* Get_d(void){return d;}
	        mat Get_s(void){return _s;}	
	private:
		mat _s;
		StoVol *S;
		mat _is;
		boost::math::normal_distribution<> *d;
	/*private:
		double _phi_n;
		double _phi_n1;
		mat _X;
		double *_Y;
		int _p;
		int _b;
		int _n;*/
};
